:root {
    /* 深棕色主题配色 */
    --primary-color: #8B4513; /* 深棕色 */
    --primary-light: #A0522D; /* 浅棕色 */
    --primary-dark: #6B340C; /* 更深棕色 */
    --secondary-color: #D2691E; /* 赤褐色 */
    --secondary-light: #DE8A4C; /* 浅赤褐色 */
    --bg-color: #F5F5DC; /* 米色背景 */
    --bg-gradient: linear-gradient(135deg, #F5F5DC 0%, #F5DEB3 100%);
    --text-color: #333;
    --light-text: #55463C;
    --border-color: #D2B48C;
    --card-bg: #FFF8DC;
    --header-height: 80px;
    --shadow: 0 2px 10px rgba(139, 69, 19, 0.1);
    --shadow-hover: 0 8px 25px rgba(139, 69, 19, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-gradient);
    color: var(--text-color);
    line-height: 1.6;
}

/* 导航栏样式 */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--header-height);
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    padding: 0 20px;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

/* 移动端菜单按钮 */
.mobile-menu-btn {
    display: none;
}

#mobileMenuToggle {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
}

.logo h1 {
    color: var(--primary-color);
    font-size: 26px;
    font-weight: 700;
    margin: 0;
}

.nav-links {
    display: flex;
    gap: 25px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-size: 16px;
    font-weight: 500;
    padding: 8px 0;
    position: relative;
    transition: color 0.3s ease;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: var(--secondary-color);
}

.nav-links a:hover::after {
    width: 100%;
}

.language-switcher select {
    padding: 5px 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--card-bg);
    font-size: 14px;
}

/* 头部Banner样式 */
header {
    margin-top: var(--header-height);
    height: 500px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(139, 69, 19, 0.4), rgba(107, 52, 12, 0.7));
    z-index: 1;
}

.banner-content {
    text-align: center;
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.banner-content h2 {
    font-size: 48px;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: 2px;
}

.banner-content p {
    font-size: 20px;
    margin-bottom: 30px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
    line-height: 1.8;
}

/* 导航站风格头部搜索框 */
.search-container {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

#surnameSearch {
    width: 400px;
    max-width: 80%;
    padding: 12px 20px;
    border: none;
    border-radius: 25px 0 0 25px;
    font-size: 16px;
    outline: none;
}

#searchButton {
    padding: 12px 25px;
    background-color: var(--secondary-color);
    border: none;
    border-radius: 0 25px 25px 0;
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

#searchButton:hover {
    background-color: var(--secondary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(210, 105, 30, 0.3);
}

/* 主要内容样式 */
main {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

section {
    margin-bottom: 60px;
}

section h2 {
    font-size: 32px;
    margin-bottom: 30px;
    color: var(--primary-color);
    text-align: center;
    position: relative;
    padding-bottom: 15px;
}

section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
}

/* 特色人物网格 */
.personage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.person-card {
    background-color: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}

.person-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

.person-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.person-info {
    padding: 20px;
}

.person-info h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.person-info p {
    color: var(--light-text);
    margin-bottom: 15px;
}

.person-info a {
    display: inline-block;
    padding: 8px 16px;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.person-info a:hover {
    background-color: #2c547c;
}

/* 最新消息列表 */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.news-item {
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 20px;
    box-shadow: var(--shadow);
    display: flex;
    gap: 20px;
    transition: box-shadow 0.3s;
}

.news-item:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

.news-img {
    width: 200px;
    height: 150px;
    flex-shrink: 0;
}

.news-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.news-content {
    flex: 1;
}

.news-content h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.news-content p {
    color: var(--light-text);
    margin-bottom: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    color: #999;
    font-size: 14px;
}

/* 姓氏导航网格样式 */
.surname-navigation {
    padding: 40px 0;
}

.surname-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
}

.surname-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background-color: var(--card-bg);
    border-radius: 8px;
    box-shadow: var(--shadow);
    text-decoration: none;
    color: var(--text-color);
    transition: transform 0.3s, box-shadow 0.3s;
}

.surname-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.surname-card:hover .surname-char {
    transform: scale(1.1);
}

.surname-char {
    font-size: 48px;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(139, 69, 19, 0.2);
    transition: transform 0.3s ease;
}

.surname-desc {
    font-size: 14px;
    color: var(--light-text);
    text-align: center;
}

.surname-card.view-all .surname-char {
    font-size: 36px;
}

/* 网站功能介绍样式 */
.site-features {
    padding: 40px 0;
    background-color: rgba(255, 248, 220, 0.7);
    border-radius: 12px;
    margin: 60px auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.feature-card {
    padding: 30px;
    background-color: var(--card-bg);
    border-radius: 8px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.feature-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.feature-card p {
    color: var(--light-text);
    margin-bottom: 20px;
}

.feature-card a {
    display: inline-block;
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    position: relative;
    padding: 5px 0;
}

.feature-card a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: width 0.3s ease;
}

.feature-card a:hover {
    color: var(--secondary-dark);
    transform: translateX(5px);
}

.feature-card a:hover::after {
    width: 100%;
}

/* 精选内容标签切换样式 */
.featured-content {
    padding: 40px 0;
}

.content-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    gap: 10px;
}

.tab-btn {
    padding: 10px 20px;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.tab-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(139, 69, 19, 0.3);
}

.tab-btn:hover:not(.active) {
    background-color: rgba(240, 240, 240, 0.8);
    border-color: var(--primary-light);
    transform: translateY(-2px);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* 移动端导航菜单 */
.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background-color: var(--primary-color);
    color: white;
    z-index: 1100;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.mobile-nav.active {
    right: 0;
}

.mobile-nav-links {
    padding: 80px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex: 1;
}

.mobile-nav-links a {
    color: white;
    text-decoration: none;
    font-size: 18px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.mobile-nav-links a:hover {
    color: var(--secondary-light);
    transform: translateX(5px);
}

.mobile-language-switcher {
    margin-top: 20px;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.mobile-language-switcher select {
    width: 100%;
    padding: 10px;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

#mobileMenuClose {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
}

/* 页脚样式 */
footer {
    background-color: var(--primary-dark);
    color: white;
    padding: 40px 0;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--primary-color));
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    padding: 0 20px;
}

.footer-section h3 {
    font-size: 20px;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--secondary-color);
}

.footer-section p {
    line-height: 1.8;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.social-links a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.social-links a:hover {
    color: var(--secondary-light);
    transform: translateX(5px);
}

.copyright {
    text-align: center;
    padding-top: 20px;
    margin-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

/* 响应式设计 */
@media (max-width: 768px) {
    :root {
        --header-height: 70px;
    }

    .logo h1 {
        font-size: 22px;
    }

    .nav-links {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .language-switcher {
        display: none;
    }
    
    .banner-content h2 {
        font-size: 36px;
    }
    
    .banner-content p {
        font-size: 18px;
    }
    
    .news-item {
        flex-direction: column;
    }
    
    .news-img {
        width: 100%;
        height: 200px;
    }
}